package com.ui.service.Impl;


import com.ui.service.ProductKuidService;
import com.wanmei.mapper.ProductkuidMapper;
import com.wanmei.pojo.Product;
import com.wanmei.pojo.ProductStoreNum;
import com.wanmei.pojo.Productkuid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductKuidServiceImpl implements ProductKuidService {
@Autowired
private ProductkuidMapper productkuidMapper;

   public List<ProductStoreNum> getProductStoreNum(int pid){
       return productkuidMapper.getProductStoreByPidAndVid(pid);
   }
   public Integer getStoreNumBySize(int pid, int vid){
       return productkuidMapper.getStoreNumByPidAndVid(pid, vid);
   }

    @Override
    public Product selectByKuid(int kuid) {
        return productkuidMapper.selectByKuid(kuid);
    }

    @Override
    public Productkuid getByPrimaryKey(int kuid) {
        return productkuidMapper.getByPrimaryKey(kuid);
    }
}
